package com.skp.shaphan.timing;

import javax.swing.Timer;

public class MainTimer extends Timer {
	private MainTimerAction action;

	public MainTimer() {
		super(50, new MainTimerAction());
		action = (MainTimerAction)getActionListeners()[0];
	}
	
	public void addAction(TimerAction action) {
		this.action.addAction(action);
		if(!this.isRunning()) {
			this.start();
		}
	}

}
